Part Number Hot Search : 
2SB16 400U80D DA330ME T5551 SSM3K3 S2000AFI LD108 LX5112A
Product Description
Full Text Search
 

To Download DS18B20U-W Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  general description the ds18b20 digital thermometer provides 9-bit to 12-bit celsius temperature measurements and has an alarm function with nonvolatile user-programmable upper and lower trigger points. the ds18b20 communicates over a 1-wire bus that by definition requires only one data line (and ground) for communication with a central micro - processor. in addition, the ds18b20 can derive power directly from the data line (parasite power), eliminating the need for an external power supply. each ds18b20 has a unique 64-bit serial code, which allows multiple ds18b20s to function on the same 1-wire bus. thus, it is simple to use one microprocessor to control many ds18b20s distributed over a large area. applications that can benefit from this feature include hvac environmental controls, temperature monitoring systems inside buildings, equipment, or machinery, and process monitoring and control systems. applications thermostatic controls industrial systems consumer products thermometers thermally sensitive systems beneits and features unique 1-wire ? interface requires only one port pin for communication reduce component count with integrated temperature sensor and eeprom ? measures temperatures from -55c to +125c (-67f to +257f) ? 0.5c accuracy from -10c to +85c ? programmable resolution from 9 bits to 12 bits ? no external components required parasitic power mode requires only 2 pins for operation (dq and gnd) simplifies distributed temperature-sensing applications with multidrop capability ? each device has a unique 64-bit serial code stored in on-board rom flexible user-definable nonvolatile (nv) alarm settings with alarm search command identifies devices with temperatures outside programmed limits available in 8-pin so (150 mils), 8-pin sop, and 3-pin to-92 packages 19-7487; rev 4; 1/15 ordering information appears at end of data sheet. 1-wire is a registered trademark of maxim integrated products, inc. bottom view 8 7 6 5 2 n.c. n.c. v dd dq n.c. n.c. n.c. gnd ds18b20 so (150 mils) (ds18b20z) + 1 4 3 7 8 5 6 1 2 3 4 + dq n.c.n.c. gnd v dd n.c.n.c. n.c. ds18b20 sop (ds18b20u) ds18b20 1 2 3 gnd dq v dd 1 1 2 3 top view to-92 (ds18b20) ds18b20 programmable resolution 1-wire digital thermometer pin conigurations downloaded from: http:///
voltage range on any pin relative to ground .... -0.5v to +6.0v operating temperature range ......................... -55c to +125c storage temperature range ............................ -55c to +125c solder temperature ............................... refer to the ipc/jedec j-std-020 specification. (-55c to +125c; v dd = 3.0v to 5.5v) note 1: all voltages are referenced to ground. note 2: the pullup supply voltage specification assumes that the pullup device is ideal, and therefore the high level of the pullup is equal to v pu . in order to meet the v ih spec of the ds18b20, the actual supply rail for the strong pullup transis - tor must include margin for the voltage drop across the transistor when it is turned on; thus: v pu_actual = v pu_ideal + v transistor . note 3: see typical performance curve in figure 1 . note 4: logic-low voltages are specified at a sink current of 4ma. note 5: to guarantee a presence pulse under low voltage parasite power conditions, v ilmax may have to be reduced to as low as 0.5v. note 6: logic-high voltages are specified at a source current of 1ma. note 7: standby current specified up to +70c. standby current typically is 3a at +125c. note 8: to minimize i dds , dq should be within the following ranges: gnd dq gnd + 0.3v or v dd C 0.3v dq v dd . note 9: active current refers to supply current during active temperature conversions or eeprom writes. note 10: dq line is high (high-z state). note 11: drift data is based on a 1000-hour stress test at +125c with v dd = 5.5v. parameter symbol conditions min typ max units supply voltage v dd local power (note 1) +3.0 +5.5 v pullup supply voltage v pu parasite power (notes 1, 2) +3.0 +5.5 v local power +3.0 v dd thermometer error t err -10c to +85c (note 3) 0.5 c -55c to +125c 2 input logic-low v il (notes 1, 4, 5) -0.3 +0.8 v input logic-high v ih local power (notes 1,6) +2.2 the lower of 5.5 or v dd + 0.3 v parasite power +3.0 sink current i l v i/o = 0.4v 4.0 ma standby current i dds (notes 7, 8) 750 1000 na active current i dd v dd = 5v (note 9) 1 1.5 ma dq input current i dq (note 10) 5 a drift (note 11) 0.2 c ds18b20 programmable resolution 1-wire digital thermometer www.maximintegrated.com maxim integrated 2 absolute maximum ratings these are stress ratings only and functional operation of the device at these or any other conditions above those indicated in the operation sections of this specification is not implied. exposure to absolute maximum rating conditions for extended periods of time may affect reliability. dc electrical characteristics downloaded from: http:///
(-55c to +125c; v dd = 3.0v to 5.5v) (-55c to +125c; v dd = 3.0v to 5.5v) note 12: see the timing diagrams in figure 2 . note 13: under parasite power, if t rstl > 960s, a power-on reset can occur. figure 1. typical performance curve parameter symbol conditions min typ max units nv write cycle time t wr 2 10 ms eeprom writes n eewr -55c to +55c 50k writes eeprom data retention t eedr -55c to +55c 10 years parameter symbol conditions min typ max units temperature conversion time t conv 9-bit resolution (note 12) 93.75 ms 10-bit resolution 187.5 11-bit resolution 375 12-bit resolution 750 time to strong pullup on t spon start convert t command issued 10 s time slot t slot (note 12) 60 120 s recovery time t rec (note 12) 1 s write 0 low time t low0 (note 12) 60 120 s write 1 low time t low1 (note 12) 1 15 s read data valid t rdv (note 12) 15 s reset time high t rsth (note 12) 480 s reset time low t rstl (notes 12, 13) 480 s presence-detect high t pdhigh (note 12) 15 60 s presence-detect low t pdlow (note 12) 60 240 s capacitance c in/out 25 pf ds18b20 typical error curve 0.50.4 0.3 0.2 0.1 0 -0.1-0.2 -0.3 -0.4 -0.5 thermometer error (c) 0 70 10 20 30 40 50 60 temperature (c) +3s error mean error -3s error ds18b20 programmable resolution 1-wire digital thermometer www.maximintegrated.com maxim integrated 3 ac electrical characteristicsCnv memoryac electrical characteristics downloaded from: http:///
figure 2. timing diagrams pin name function so sop to-92 1, 2, 6, 7, 8 2, 3, 5, 6, 7 n.c. no connection 3 8 3 v dd optional v dd . v dd must be grounded for operation in parasite power mode. 4 1 2 dq data input/output. open-drain 1-wire interface pin. also provides power to the device when used in parasite power mode (see the powering the ds18b20 section.) 5 4 1 gnd ground start of next cycle 1-wire write zero time slot t rec t slot t low0 1-wire read zero time slot t rec t slot start of next cycle t rdv 1-wire reset pulse1-wire presence detect t rstl t rsth t pdih presence detect t pdlow reset pulse from host ds18b20 programmable resolution 1-wire digital thermometer www.maximintegrated.com maxim integrated 4 pin description downloaded from: http:///
overview figure 3 shows a block diagram of the ds18b20, and pin descriptions are given in the pin description table. the 64-bit rom stores the devices unique serial code. the scratchpad memory contains the 2-byte temperature register that stores the digital output from the temperature sensor. in addition, the scratchpad provides access to the 1-byte upper and lower alarm trigger registers (t h and t l ) and the 1-byte configuration register. the configura - tion register allows the user to set the resolution of the temperature-to-digital conversion to 9, 10, 11, or 12 bits. the t h , t l , and configuration registers are nonvolatile (eeprom), so they will retain data when the device is powered down. the ds18b20 uses maxims exclusive 1-wire bus proto - col that implements bus communication using one control signal. the control line requires a weak pullup resistor since all devices are linked to the bus via a 3-state or open-drain port (the dq pin in the case of the ds18b20). in this bus system, the microprocessor (the master device) identifies and addresses devices on the bus using each devices unique 64-bit code. because each device has a unique code, the number of devices that can be addressed on one bus is virtually unlimited. the 1-wire bus protocol, including detailed explanations of the commands and time slots, is covered in the 1-wire bus system section. another feature of the ds18b20 is the ability to oper - ate without an external power supply. power is instead supplied through the 1-wire pullup resistor through the dq pin when the bus is high. the high bus signal also charges an internal capacitor (c pp ), which then supplies power to the device when the bus is low. this method of deriving power from the 1-wire bus is referred to as para - site power. as an alternative, the ds18b20 may also be powered by an external supply on v dd . operationmeasuring temperature the core functionality of the ds18b20 is its direct-to- digital temperature sensor. the resolution of the tempera - ture sensor is user-configurable to 9, 10, 11, or 12 bits, corresponding to increments of 0.5c, 0.25c, 0.125c, and 0.0625c, respectively. the default resolution at power-up is 12-bit. the ds18b20 powers up in a low- power idle state. to initiate a temperature measurement and a-to-d conversion, the master must issue a convert t [44h] command. following the conversion, the resulting thermal data is stored in the 2-byte temperature register in the scratchpad memory and the ds18b20 returns to its idle state. if the ds18b20 is powered by an external sup - ply, the master can issue read time slots (see the 1-wire bus system section) after the convert t command and the ds18b20 will respond by transmitting 0 while the tem - perature conversion is in progress and 1 when the con - version is done. if the ds18b20 is powered with parasite power, this notification technique cannot be used since the bus must be pulled high by a strong pullup during the entire temperature conversion. the bus requirements for parasite power are explained in detail in the powering the ds18b20 section. figure 3. ds18b20 block diagram temperature sensor scratchpad memory control logic 64-bit rom and 1-wire port parasite power circuit power- supply sense internal v dd gnd dq v pu 4.7 k? configuration register (eeprom) 8-bit crc generator v dd c pp ds18b20 alarm low trigger (t l ) register (eeprom) alarm high trigger (t h ) register (eeprom) ds18b20 programmable resolution 1-wire digital thermometer www.maximintegrated.com maxim integrated 5 downloaded from: http:///
the ds18b20 output temperature data is calibrated in degrees celsius; for fahrenheit applications, a lookup table or conversion routine must be used. the tempera - ture data is stored as a 16-bit sign-extended twos comple - ment number in the temperature register (see figure 4 ). the sign bits (s) indicate if the temperature is positive or negative: for positive numbers s = 0 and for negative numbers s = 1. if the ds18b20 is configured for 12-bit resolution, all bits in the temperature register will contain valid data. for 11-bit resolution, bit 0 is undefined. for 10-bit resolution, bits 1 and 0 are undefined, and for 9-bit resolution bits 2, 1, and 0 are undefined. table 1 gives examples of digital output data and the corresponding temperature reading for 12-bit resolution conversions. operationalarm signaling after the ds18b20 performs a temperature conversion, the temperature value is compared to the user-defined twos complement alarm trigger values stored in the 1-byte t h and t l registers (see figure 5 ). the sign bit (s) indicates if the value is positive or negative: for positive numbers s = 0 and for negative numbers s = 1. the t h and t l registers are nonvolatile (eeprom) so they will retain data when the device is powered down. t h and t l can be accessed through bytes 2 and 3 of the scratchpad as explained in the memory section. only bits 11 through 4 of the temperature register are used in the t h and t l comparison since t h and t l are 8-bit registers. if the measured temperature is lower than figure 4. temperature register format figure 5. t h and t l register format table 1. temperature/data relationship *the power-on reset value of the temperature register is +85c. temperature (c) digital output (binary) digital output (hex) +125 0000 0111 1101 0000 07d0h +85* 0000 0101 0101 0000 0550h +25.0625 0000 0001 1001 0001 0191h +10.125 0000 0000 1010 0010 00a2h +0.5 0000 0000 0000 1000 0008h 0 0000 0000 0000 0000 0000h -0.5 1111 1111 1111 1000 fff8h -10.125 1111 1111 0101 1110 ff5eh -25.0625 1111 1110 0110 1111 fe6fh -55 1111 1100 1001 0000 fc90h bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 ls byte 2 3 2 2 2 1 2 0 2 -1 2 -2 2 -3 2 -4 bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 ms byte s s s s s 2 6 2 5 2 4 s = sign bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 s 2 6 2 5 2 4 2 3 2 2 2 1 2 0 ds18b20 programmable resolution 1-wire digital thermometer www.maximintegrated.com maxim integrated 6 downloaded from: http:///
or equal to t l or higher than or equal to t h , an alarm con - dition exists and an alarm flag is set inside the ds18b20. this flag is updated after every temperature measure - ment; therefore, if the alarm condition goes away, the flag will be turned off after the next temperature conversion. the master device can check the alarm flag status of all ds18b20s on the bus by issuing an alarm search [ech] command. any ds18b20s with a set alarm flag will respond to the command, so the master can determine exactly which ds18b20s have experienced an alarm condition. if an alarm condition exists and the t h or t l settings have changed, another temperature conversion should be done to validate the alarm condition. powering the ds18b20 the ds18b20 can be powered by an external supply on the v dd pin, or it can operate in parasite power mode, which allows the ds18b20 to function without a local external supply. parasite power is very useful for applica - tions that require remote temperature sensing or that are very space constrained. figure 3 shows the ds18b20s parasite-power control circuitry, which steals power from the 1-wire bus via the dq pin when the bus is high. the stolen charge powers the ds18b20 while the bus is high, and some of the charge is stored on the parasite power capacitor (c pp ) to provide power when the bus is low. when the ds18b20 is used in parasite power mode, the v dd pin must be connected to ground. in parasite power mode, the 1-wire bus and cpp can pro - vide sufficient current to the ds18b20 for most operations as long as the specified timing and voltage requirements are met (see the dc electrical characteristics and ac electrical characteristics ). however, when the ds18b20 is performing temperature conversions or copying data from the scratchpad memory to eeprom, the operating current can be as high as 1.5ma. this current can cause an unacceptable voltage drop across the weak 1-wire pullup resistor and is more current than can be supplied by c pp . to assure that the ds18b20 has sufficient supply current, it is necessary to provide a strong pullup on the 1-wire bus whenever temperature conversions are tak - ing place or data is being copied from the scratchpad to eeprom. this can be accomplished by using a mosfet to pull the bus directly to the rail as shown in figure 6 . the 1-wire bus must be switched to the strong pullup within 10s (max) after a convert t [44h] or copy scratchpad [48h] command is issued, and the bus must be held high by the pullup for the duration of the conversion (t conv ) or data transfer (t wr = 10ms). no other activity can take place on the 1-wire bus while the pullup is enabled. the ds18b20 can also be powered by the conventional method of connecting an external power supply to the v dd pin, as shown in figure 7 . the advantage of this method is that the mosfet pullup is not required, and the 1-wire bus is free to carry other traffic during the tem - perature conversion time. the use of parasite power is not recommended for tem - peratures above +100c since the ds18b20 may not be able to sustain communications due to the higher leak - age currents that can exist at these temperatures. for applications in which such temperatures are likely, it is strongly recommended that the ds18b20 be powered by an external power supply. in some situations the bus master may not know whether the ds18b20s on the bus are parasite powered or pow - ered by external supplies. the master needs this informa - tion to determine if the strong bus pullup should be used during temperature conversions. to get this information, the master can issue a skip rom [cch] command fol - lowed by a read power supply [b4h] command followed by a read time slot. during the read time slot, parasite powered ds18b20s will pull the bus low, and externally powered ds18b20s will let the bus remain high. if the bus is pulled low, the master knows that it must supply the strong pullup on the 1-wire bus during temperature conversions. figure 6. supplying the parasite-powered ds18b20 during temperature conversions figure 7. powering the ds18b20 with an external supply v pu 4.7 k? v pu 1-wire bus ds18b20 gnd dq v dd to other 1-wire devices p v pu 4.7 k? 1-wire bus ds18b20 gnd dq v dd to other 1-wire devices p v dd (external supply) ds18b20 programmable resolution 1-wire digital thermometer www.maximintegrated.com maxim integrated 7 downloaded from: http:///
64-bit lasered rom code each ds18b20 contains a unique 64Cbit code (see figure 8 ) stored in rom. the least significant 8 bits of the rom code contain the ds18b20s 1-wire family code: 28h. the next 48 bits contain a unique serial number. the most significant 8 bits contain a cyclic redundancy check (crc) byte that is calculated from the first 56 bits of the rom code. a detailed explanation of the crc bits is provided in the crc generation section. the 64-bit rom code and associated rom function control logic allow the ds18b20 to operate as a 1-wire device using the protocol detailed in the 1-wire bus system section. memory the ds18b20s memory is organized as shown in figure 9 . the memory consists of an sram scratchpad with nonvolatile eeprom storage for the high and low alarm trigger registers (t h and t l ) and configuration register. note that if the ds18b20 alarm function is not used, the th and tl registers can serve as general-purpose memory. all memory commands are described in detail in the ds18b20 function commands section. byte 0 and byte 1 of the scratchpad contain the lsb and the msb of the temperature register, respectively. these bytes are read-only. bytes 2 and 3 provide access to th and tl registers. byte 4 contains the configuration regis - ter data, which is explained in detail in the configuration register section. bytes 5, 6, and 7 are reserved for inter - nal use by the device and cannot be overwritten. byte 8 of the scratchpad is read-only and contains the crc code for bytes 0 through 7 of the scratchpad. the ds18b20 generates this crc using the method described in the crc generation section. data is written to bytes 2, 3, and 4 of the scratchpad using the write scratchpad [4eh] command; the data must be transmitted to the ds18b20 starting with the least signifi - cant bit of byte 2. to verify data integrity, the scratchpad can be read (using the read scratchpad [beh] command) after the data is written. when reading the scratchpad, data is transferred over the 1-wire bus starting with the least significant bit of byte 0. to transfer the t h , t l and configuration data from the scratchpad to eeprom, the master must issue the copy scratchpad [48h] command. data in the eeprom registers is retained when the device is powered down; at power-up the eeprom data is reloaded into the corresponding scratchpad locations. data can also be reloaded from eeprom to the scratch - pad at any time using the recall e 2 [b8h] command. the master can issue read time slots following the recall e 2 command and the ds18b20 will indicate the status of the recall by transmitting 0 while the recall is in progress and 1 when the recall is done. figure 8. 64-bit lasered rom codefigure 9. ds18b20 memory map byte 0 byte 1 temperature lsb (50h) temperature msb (05h) (85c) byte 2byte 3 t h register or user byte 1* t l register or user byte 2* byte 4byte 5 configuration register* reserved (ffh) byte 6byte 7 reserved reserved (10h) byte 8 crc* *power-up state depends on value(s) stored in eeprom. t h register or user byte 1* t l register or user byte 2* configuration register* scratchpad (power-up state) eeprom 8-bit crc 48-bit serial number 8-bit family code (28h) msb lsb msb lsb msb lsb ds18b20 programmable resolution 1-wire digital thermometer www.maximintegrated.com maxim integrated 8 downloaded from: http:///
coniguration register byte 4 of the scratchpad memory contains the configura - tion register, which is organized as illustrated in figure 10 . the user can set the conversion resolution of the ds18b20 using the r0 and r1 bits in this register as shown in table 2 . the power-up default of these bits is r0 = 1 and r1 = 1 (12-bit resolution). note that there is a direct tradeoff between resolution and conversion time. bit 7 and bits 0 to 4 in the configuration register are reserved for internal use by the device and cannot be overwritten. crc generation crc bytes are provided as part of the ds18b20s 64-bit rom code and in the 9 th byte of the scratchpad memory. the rom code crc is calculated from the first 56 bits of the rom code and is contained in the most significant byte of the rom. the scratchpad crc is calculated from the data stored in the scratchpad, and therefore it chang - es when the data in the scratchpad changes. the crcs provide the bus master with a method of data validation when data is read from the ds18b20. to verify that data has been read correctly, the bus master must re-calculate the crc from the received data and then compare this value to either the rom code crc (for rom reads) or to the scratchpad crc (for scratchpad reads). if the cal - culated crc matches the read crc, the data has been received error free. the comparison of crc values and the decision to continue with an operation are determined entirely by the bus master. there is no circuitry inside the ds18b20 that prevents a command sequence from pro - ceeding if the ds18b20 crc (rom or scratchpad) does not match the value generated by the bus master. the equivalent polynomial function of the crc (rom or scratchpad) is: crc = x 8 + x 5 + x 4 + 1 the bus master can re-calculate the crc and compare it to the crc values from the ds18b20 using the polyno - mial generator shown in figure 11 . this circuit consists of a shift register and xor gates, and the shift register bits are initialized to 0. starting with the least significant bit of the rom code or the least significant bit of byte 0 in the scratchpad, one bit at a time should shifted into the shift register. after shifting in the 56th bit from the rom or the most significant bit of byte 7 from the scratchpad, the polynomial generator will contain the recalculated crc. next, the 8-bit rom code or scratchpad crc from the ds18b20 must be shifted into the circuit. at this point, if the re-calculated crc was correct, the shift register will contain all 0s. additional information about the maxim 1-wire cyclic redundancy check is available in application note 27: understanding and using cyclic redundancy checks with maxim ibutton products . figure 10. configuration register figure 11. crc generator table 2. thermometer resolution configuration r1 r0 resolution (bits) max conversion time 0 0 9 93.75ms (t conv /8) 0 1 10 187.5ms (t conv /4) 1 0 11 375ms (t conv /2) 1 1 12 750ms (t conv ) xor xor xor input msb lsb bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0 r1 r0 1 1 1 1 1 ds18b20 programmable resolution 1-wire digital thermometer www.maximintegrated.com maxim integrated 9 downloaded from: http:///
1-wire bus system the 1-wire bus system uses a single bus master to con - trol one or more slave devices. the ds18b20 is always a slave. when there is only one slave on the bus, the sys - tem is referred to as a single-drop system; the system is multidrop if there are multiple slaves on the bus. all data and commands are transmitted least significant bit first over the 1-wire bus. the following discussion of the 1-wire bus system is broken down into three topics: hardware configuration, transaction sequence, and 1-wire signaling (signal types and timing). hardware coniguration the 1-wire bus has by definition only a single data line. each device (master or slave) interfaces to the data line via an open-drain or 3-state port. this allows each device to release the data line when the device is not transmit - ting data so the bus is available for use by another device. the 1-wire port of the ds18b20 (the dq pin) is open drain with an internal circuit equivalent to that shown in figure 12 . the 1-wire bus requires an external pullup resistor of approximately 5k?; thus, the idle state for the 1-wire bus is high. if for any reason a transaction needs to be suspended, the bus must be left in the idle state if the transaction is to resume. infinite recovery time can occur between bits so long as the 1-wire bus is in the inactive (high) state during the recovery period. if the bus is held low for more than 480s, all components on the bus will be reset. transaction sequence the transaction sequence for accessing the ds18b20 is as follows: step 1. initialization step 2. rom command (followed by any required data exchange) step 3. ds18b20 function command (followed by any required data exchange) it is very important to follow this sequence every time the ds18b20 is accessed, as the ds18b20 will not respond if any steps in the sequence are missing or out of order. exceptions to this rule are the search rom [f0h] and alarm search [ech] commands. after issuing either of these rom commands, the master must return to step 1 in the sequence. initialization all transactions on the 1-wire bus begin with an initializa - tion sequence. the initialization sequence consists of a reset pulse transmitted by the bus master followed by presence pulse(s) transmitted by the slave(s). the pres - ence pulse lets the bus master know that slave devices (such as the ds18b20) are on the bus and are ready to operate. timing for the reset and presence pulses is detailed in the 1-wire signaling section. rom commands after the bus master has detected a presence pulse, it can issue a rom command. these commands operate on the unique 64-bit rom codes of each slave device and allow the master to single out a specific device if many are present on the 1-wire bus. these commands also allow the master to determine how many and what types of devices are present on the bus or if any device has experienced an alarm condition. there are five rom commands, and each command is 8 bits long. the master device must issue an appropriate rom command before issuing a ds18b20 function command. a flowchart for operation of the rom commands is shown in figure 13 . search rom [f0h] when a system is initially powered up, the master must identify the rom codes of all slave devices on the bus, which allows the master to determine the number of slaves and their device types. the master learns the rom codes through a process of elimination that requires the master to perform a search rom cycle (i.e., search rom command followed by data exchange) as many times as necessary to identify all of the slave devices. figure 12. hardware configuration dq v pu 4.7 k? ds18b20 1-wire port rx tx 100 ? mosfet 5a typ 1-wire bus rxtx rx = receive tx = transmit ds18b20 programmable resolution 1-wire digital thermometer www.maximintegrated.com maxim integrated 10 downloaded from: http:///
if there is only one slave on the bus, the simpler read rom [33h] command can be used in place of the search rom process. for a detailed explanation of the search rom procedure, refer to application note 937: book of ibutton ? standards . after every search rom cycle, the bus master must return to step 1 (initialization) in the transaction sequence. read rom [33h] this command can only be used when there is one slave on the bus. it allows the bus master to read the slaves 64-bit rom code without using the search rom proce - dure. if this command is used when there is more than one slave present on the bus, a data collision will occur when all the slaves attempt to respond at the same time. match rom [55h] the match rom command followed by a 64-bit rom code sequence allows the bus master to address a specific slave device on a multidrop or single-drop bus. only the slave that exactly matches the 64-bit rom code sequence will respond to the function command issued by the master; all other slaves on the bus will wait for a reset pulse. skip rom [cch] the master can use this command to address all devices on the bus simultaneously without sending out any rom code information. for example, the master can make all ds18b20s on the bus perform simultaneous temperature conversions by issuing a skip rom command followed by a convert t [44h] command. note that the read scratchpad [beh] command can follow the skip rom command only if there is a single slave device on the bus. in this case, time is saved by allowing the master to read from the slave without send - ing the devices 64-bit rom code. a skip rom command followed by a read scratchpad command will cause a data collision on the bus if there is more than one slave since multiple devices will attempt to transmit data simultaneously. alarm search [ech] the operation of this command is identical to the operation of the search rom command except that only slaves with a set alarm flag will respond. this command allows the master device to determine if any ds18b20s experienced an alarm condition during the most recent temperature conversion. after every alarm search cycle (i.e., alarm search command followed by data exchange), the bus master must return to step 1 (initialization) in the transac - tion sequence. see the operationalarm signaling sec - tion for an explanation of alarm flag operation. ds18b20 function commands after the bus master has used a rom command to address the ds18b20 with which it wishes to communi - cate, the master can issue one of the ds18b20 function commands. these commands allow the master to write to and read from the ds18b20s scratchpad memory, initiate temperature conversions and determine the power supply mode. the ds18b20 function commands, which are described below, are summarized in table 3 and illus - trated by the flowchart in figure 14 . convert t [44h] this command initiates a single temperature conversion. following the conversion, the resulting thermal data is stored in the 2-byte temperature register in the scratch - pad memory and the ds18b20 returns to its low-power idle state. if the device is being used in parasite power mode, within 10s (max) after this command is issued the master must enable a strong pullup on the 1-wire bus for the duration of the conversion (t conv ) as described in the powering the ds18b20 section. if the ds18b20 is powered by an external supply, the master can issue read time slots after the convert t command and the ds18b20 will respond by transmitting a 0 while the temperature conversion is in progress and a 1 when the conversion is done. in parasite power mode this notification technique cannot be used since the bus is pulled high by the strong pullup during the conversion. write scratchpad [4eh] this command allows the master to write 3 bytes of data to the ds18b20s scratchpad. the first data byte is written into the t h register (byte 2 of the scratchpad), the second byte is written into the t l register (byte 3), and the third byte is written into the configuration register (byte 4). data must be transmitted least significant bit first. all three bytes must be written before the master issues a reset, or the data may be corrupted. read scratchpad [beh] this command allows the master to read the contents of the scratchpad. the data transfer starts with the least sig - nificant bit of byte 0 and continues through the scratchpad until the 9th byte (byte 8 C crc) is read. the master may issue a reset to terminate reading at any time if only part of the scratchpad data is needed. i button is a registered trademark of maxim integrated products, inc. ds18b20 programmable resolution 1-wire digital thermometer www.maximintegrated.com maxim integrated 11 downloaded from: http:///
copy scratchpad [48h]this command copies the contents of the scratchpad t h , t l and configuration registers (bytes 2, 3 and 4) to eeprom. if the device is being used in parasite power mode, within 10s (max) after this command is issued the master must enable a strong pullup on the 1-wire bus for at least 10ms as described in the powering the ds18b20 section.recall e 2 [b8h] this command recalls the alarm trigger values (t h and t l ) and configuration data from eeprom and places the data in bytes 2, 3, and 4, respectively, in the scratchpad memory. the master device can issue read time slots following the recall e 2 command and the ds18b20 will indicate the status of the recall by transmitting 0 while the recall is in progress and 1 when the recall is done. the recall operation happens automatically at power-up, so valid data is available in the scratchpad as soon as power is applied to the device. read power supply [b4h] the master device issues this command followed by a read time slot to determine if any ds18b20s on the bus are using parasite power. during the read time slot, para - site powered ds18b20s will pull the bus low, and exter - nally powered ds18b20s will let the bus remain high. see the powering the ds18b20 section for usage information for this command. table 3. ds18b20 function command set note 1: for parasite-powered ds18b20s, the master must enable a strong pullup on the 1-wire bus during temperature conver - sions and copies from the scratchpad to eeprom. no other bus activity may take place during this time. note 2: the master can interrupt the transmission of data at any time by issuing a reset. note 3: all three bytes must be written before a reset is issued. command description protocol 1-wire bus activity after command is issued notes temperature conversion commands convert t initiates temperature conversion. 44h ds18b20 transmits conversion status to master (not applicable for parasite- powered ds18b20s). 1 memory commands read scratchpad reads the entire scratchpad including the crc byte. beh ds18b20 transmits up to 9 data bytes to master. 2 write scratchpad writes data into scratchpad bytes 2, 3, and 4 (t h , t l , and coniguration registers). 4eh master transmits 3 data bytes to ds18b20. 3 copy scratchpad copies t h , t l , and coniguration register data from the scratchpad to eeprom. 48h none 1 recall e 2 recalls t h , t l , and coniguration register data from eeprom to the scratchpad. b8h ds18b20 transmits recall status to master. read power supply signals ds18b20 power supply mode to the master. b4h ds18b20 transmits supply status to master. ds18b20 programmable resolution 1-wire digital thermometer www.maximintegrated.com maxim integrated 12 downloaded from: http:///
figure 13. rom commands flowchart master tx rom command ds18b20 tx presence pulse master tx reset pulse initialization sequence 33h read rom command 55h match rom command f0h search rom command ech alarm search command cch skip rom command n y n y n y n y n y master tx bit 0 ds18b20 tx bit 0 ds18b20 tx bit 0 master tx bit 0 bit 0 match ? bit 0 match ? device(s) with alarm flag set ? n y n y n y n master tx bit 1 ds18b20 tx bit 1 ds18b20 tx bit 1 master tx bit 1 bit 1 match? bit 1 match? n y y n ds18b20 tx bit 63 ds18b20 tx bit 63 master tx bit 63 master tx bit 63 ds18b20 tx bit 0 ds18b20 tx bit 0 master tx bit 0 bit 63 match? bit 63 match? n y y n ds18b20 tx family code 1 byte ds18b20 tx serial number 6 bytes ds18b20 tx crc byte master tx function command (figure 14) ds18b20 programmable resolution 1-wire digital thermometer www.maximintegrated.com maxim integrated 13 downloaded from: http:///
figure 14. ds18b20 function commands flowchart master tx function command 44h convert temperature ? n y parasite power ? ds18b20 begins conversion device converting temperature ? y master rx 0s master rx 1s n master enables strong pull-up on dq ds18b20 converts temperature master disables strong pullup y n b4h read power supply ? y parasite power ? y n master rx 1s master rx 0s n b8h recall e 2 ? y master begins data recall from e 2 prom device busy recalling data ? y master rx 0s master rx 1s n n beh read scratchpad ? n master rx data byte from scratchpad master tx reset ? have 8 bytes been read ? master rx scratchpad crc byte n y ny master tx t h byte to scratchpad master tx t l byte to scratchpad master tx config. byte to scratchpad 4eh write scratchpad ? n y 48h copy scratchpad ? n y parasite power ? copy in progress ? y master rx 0s master rx 1s n master enables strong pull-up on dq data copied from scratchpad to eeprom master disables strong pullup y n return to initialization sequence (figure 13) for next transaction y ds18b20 programmable resolution 1-wire digital thermometer www.maximintegrated.com maxim integrated 14 downloaded from: http:///
1-wire signaling the ds18b20 uses a strict 1-wire communication pro - tocol to ensure data integrity. several signal types are defined by this protocol: reset pulse, presence pulse, write 0, write 1, read 0, and read 1. the bus master initiates all these signals, with the exception of the presence pulse. initialization procedurereset and presence pulses all communication with the ds18b20 begins with an ini - tialization sequence that consists of a reset pulse from the master followed by a presence pulse from the ds18b20. this is illustrated in figure 15 . when the ds18b20 sends the presence pulse in response to the reset, it is indicating to the master that it is on the bus and ready to operate. during the initialization sequence the bus master trans - mits (t x ) the reset pulse by pulling the 1-wire bus low for a minimum of 480s. the bus master then releases the bus and goes into receive mode (r x ). when the bus is released, the 5k? pullup resistor pulls the 1-wire bus high. when the ds18b20 detects this rising edge, it waits 15s to 60s and then transmits a presence pulse by pull - ing the 1-wire bus low for 60s to 240s. read/write time slots the bus master writes data to the ds18b20 during write time slots and reads data from the ds18b20 during read time slots. one bit of data is transmitted over the 1-wire bus per time slot. write time slots there are two types of write time slots: write 1 time slots and write 0 time slots. the bus master uses a write 1 time slot to write a logic 1 to the ds18b20 and a write 0 time slot to write a logic 0 to the ds18b20. all write time slots must be a minimum of 60s in duration with a minimum of a 1s recovery time between individual write slots. both types of write time slots are initiated by the master pulling the 1-wire bus low (see figure 14 ). to generate a write 1 time slot, after pulling the 1-wire bus low, the bus master must release the 1-wire bus within 15s. when the bus is released, the 5k? pullup resistor will pull the bus high. to generate a write 0 time slot, after pulling the 1-wire bus low, the bus master must continue to hold the bus low for the duration of the time slot (at least 60s). the ds18b20 samples the 1-wire bus during a window that lasts from 15s to 60s after the master initiates the write time slot. if the bus is high during the sampling win - dow, a 1 is written to the ds18b20. if the line is low, a 0 is written to the ds18b20. figure 15. initialization timing line type legend ds18b20 pulling low resistor pullup master tx reset pulse 480s minimum master rx 480s minimum ds18b20 waits 15-60s v pu 1-wire bus gnd ds18b20 tx presence pulse 60-240s bus master pulling low ds18b20 programmable resolution 1-wire digital thermometer www.maximintegrated.com maxim integrated 15 downloaded from: http:///
read time slots the ds18b20 can only transmit data to the master when the master issues read time slots. therefore, the master must generate read time slots immediately after issuing a read scratchpad [beh] or read power supply [b4h] command, so that the ds18b20 can provide the request - ed data. in addition, the master can generate read time slots after issuing convert t [44h] or recall e 2 [b8h] com - mands to find out the status of the operation as explained in the ds18b20 function commands section. all read time slots must be a minimum of 60s in duration with a minimum of a 1s recovery time between slots. a read time slot is initiated by the master device pulling the 1-wire bus low for a minimum of 1s and then releasing the bus (see figure 16 ). after the master initiates the read time slot, the ds18b20 will begin transmitting a 1 or 0 on bus. the ds18b20 transmits a 1 by leaving the bus high and transmits a 0 by pulling the bus low. when transmitting a 0, the ds18b20 will release the bus by the end of the time slot, and the bus will be pulled back to its high idle state by the pullup resister. output data from the ds18b20 is valid for 15s after the falling edge that initiated the read time slot. therefore, the master must release the bus and then sample the bus state within 15s from the start of the slot. figure 17 illustrates that the sum of t init , t rc , and t sample must be less than 15s for a read time slot. figure 18 shows that system timing margin is maximized by keeping t init and t rc as short as possible and by locating the master sample time during read time slots towards the end of the 15s period. figure 16. read/write time slot timing diagram master write 0 slot master write 1 slot master read 0 slot master read 1 slot 60s < tx 0 < 120s start of slot start of slot 1s < t rec < 1s min typ max ds18b20 samples 15s 15s 30s min typ max ds18b20 samples 15s 15s 30s v pu 1-wire bus gnd v pu 1-wire bus gnd 1s < t rec < 15s > 1s master samples 45s master samples > 1s 15s line type legend resistor pullup ds18b20 pulling low bus master pulling low ds18b20 programmable resolution 1-wire digital thermometer www.maximintegrated.com maxim integrated 16 downloaded from: http:///
related application notes the following application notes can be applied to the ds18b20 and are available at www.maximintegrated.com . application note 27: understanding and using cyclic redundancy checks with maxim ibutton products application note 122: using dallas 1-wire ics in 1-cell li-ion battery packs with low-side n-channel safety fets master application note 126: 1-wire communication through software application note 162: interfacing the ds18x20/ds1822 1-wire temperature sensor in a microcontroller environment application note 208: curve fitting the error of a bandgap-based digital temperature sensor application note 2420: 1-wire communication with a microchip picmicro microcontroller application note 3754: single-wire serial bus carries isolated power and data sample 1-wire subroutines that can be used in conjunc - tion with a pplication note 74: reading and writing ibut - tons via serial interfaces can be downloaded from the maxim website. figure 17. detailed master read 1 timing figure 18. recommended master read 1 timing vih of master master samples v pu 1-wire bus gnd 15s t int > 1s t rc vih of master line type legend resistor pullup bus master pulling low master samples 15s t int = small t rc = small v pu 1-wire bus gnd ds18b20 programmable resolution 1-wire digital thermometer www.maximintegrated.com maxim integrated 17 downloaded from: http:///
ds18b20 operation example 1 in this example there are multiple ds18b20s on the bus and they are using parasite power. the bus master initi - ates a temperature conversion in a specific ds18b20 and then reads its scratchpad and recalculates the crc to verify the data. ds18b20 operation example 2 in this example there is only one ds18b20 on the bus and it is using parasite power. the master writes to the th, tl, and configuration registers in the ds18b20 scratchpad and then reads the scratchpad and recalculates the crc to verify the data. the master then copies the scratchpad contents to eeprom. master mode data (lsb first) comments tx reset master issues reset pulse. rx presence ds18b20s respond with presence pulse. tx 55h master issues match rom command. tx 64-bit rom code master sends ds18b20 rom code. tx 44h master issues convert t command. tx dq line held high by strong pullup master applies strong pullup to dq for the duration of the conversion (t conv ). tx reset master issues reset pulse. rx presence ds18b20s respond with presence pulse. tx 55h master issues match rom command. tx 64-bit rom code master sends ds18b20 rom code. tx beh master issues read scratchpad command. rx 9 data bytes master reads entire scratchpad including crc. the master then recalculates the crc of the irst eight data bytes from the scratchpad and compares the calculated crc with the read crc (byte 9). if they match, the master continues; if not, the read operation is repeated. master mode data (lsb first) comments tx reset master issues reset pulse. rx presence ds18b20 responds with presence pulse. tx cch master issues skip rom command. tx 4eh master issues write scratchpad command. tx 3 data bytes master sends three data bytes to scratchpad (t h , t l , and conig). tx reset master issues reset pulse. rx presence ds18b20 responds with presence pulse. tx cch master issues skip rom command. tx beh master issues read scratchpad command. rx 9 data bytes master reads entire scratchpad including crc. the master then recalculates the crc of the irst eight data bytes from the scratchpad and compares the calculated crc with the read crc (byte 9). if they match, the master continues; if not, the read operation is repeated. tx reset master issues reset pulse. rx presence ds18b20 responds with presence pulse. tx cch master issues skip rom command. tx 48h master issues copy scratchpad command. tx dq line held high by strong pullup master applies strong pullup to dq for at least 10ms while copy operation is in progress. ds18b20 programmable resolution 1-wire digital thermometer www.maximintegrated.com maxim integrated 18 downloaded from: http:///
+denotes a lead-free package. a + will appear on the top mark of lead-free packages. t&r = tape and reel. * to-92 packages in tape and reel can be ordered with straight or formed leads. choose sl for straight leads. bulk to-92 orders are straight leads only. part temp range pin-package top mark ds18b20 -55c to +125c 3 to-92 18b20 ds18b20+ -55c to +125c 3 to-92 18b20 ds18b20/t&r -55c to +125c 3 to-92 (2000 piece) 18b20 ds18b20+t&r -55c to +125c 3 to-92 (2000 piece) 18b20 ds18b20-sl/t&r -55c to +125c 3 to-92 (2000 piece)* 18b20 ds18b20-sl+t&r -55c to +125c 3 to-92 (2000 piece)* 18b20 ds18b20u -55c to +125c 8 fsop 18b20 ds18b20u+ -55c to +125c 8 fsop 18b20 ds18b20u/t&r -55c to +125c 8 fsop (3000 piece) 18b20 ds18b20u+t&r -55c to +125c 8 fsop (3000 piece) 18b20 ds18b20z -55c to +125c 8 so ds18b20 ds18b20z+ -55c to +125c 8 so ds18b20 ds18b20z/t&r -55c to +125c 8 so (2500 piece) ds18b20 ds18b20z+t&r -55c to +125c 8 so (2500 piece) ds18b20 ds18b20 programmable resolution 1-wire digital thermometer www.maximintegrated.com maxim integrated 19 ordering information downloaded from: http:///
revision date description pages changed 030107 in the absolute maximum ratings section, removed the relow oven temperature value of +220c. reference to jedec speciication for relow remains. 19 101207 in the operationalarm signaling section, added or equal to in the description for a th alarm condition 5 in the memory section, removed incorrect text describing memory. 7 in the coniguration register section, removed incorrect text describing coniguration register. 8 042208 in the ordering information table, added to-92 straight-lead packages and included a note that the to-92 package in tape and reel can be ordered with either formed or straight leads. 2 1/15 updated beneits and features section 1 maxim integrated cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a maxim integrated product. no circuit patent licenses are implied. maxim integrated reserves the right to change the circuitry and speciications without n otice at any time. the parametric values (min and max limits) shown in the electrical characteristics table are guaranteed. other parametric values quoted in this data sheet are provided for guidance. maxim integrated and the maxim integrated logo are trademarks of maxim integrated products, inc. ds18b20 programmable resolution 1-wire digital thermometer ? 2015 maxim integrated products, inc. 20 revision history for pricing, delivery, and ordering information, please contact maxim direct at 1-888-629-4642, or visit maxim integrateds website at www.maximintegrated.com. downloaded from: http:///


▲Up To Search▲   

 
Price & Availability of DS18B20U-W

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X